package com.jvyou.mybatis.demo.mapper1;

import com.jvyou.mybatis.annotations.Param;
import com.jvyou.mybatis.annotations.XmlMapper;
import com.jvyou.mybatis.demo.entity.Order;

import java.util.List;

/**
 * @author 橘柚
 * @version 1.0-SNAPSHOT
 * @Date 2024/7/3 11:23
 * @Description
 */
public interface OrderMapper {

    @XmlMapper
    Order getById(@Param("id") Long id);

    @XmlMapper
    List<Order> getList();

    @XmlMapper
    int insert(@Param("order") Order order);

    @XmlMapper
    int update(@Param("order") Order order);

    @XmlMapper
    int delete(@Param("id") Long id);

    Order getByName(@Param("name") String name);

    List<Order> getByNameList(@Param("name") String name);

    int updateById(@Param("name") String name, @Param("id") Long id);

    int insertByName(@Param("name") String name);

}
